package com.wutong.resonance.model.plugin.processor;

import com.wutong.resonance.model.audio.AudioData;
import com.wutong.resonance.model.audio.AudioParams;
import com.wutong.resonance.model.plugin.Plugin;

/**
 * 处理器插件基类
 *
 * @author wutong
 */
public abstract class ProcessorPlugin extends Plugin {


    /**
     * 插件构造函数
     *
     * @param pluginName 插件名称
     * @param pluginDesc 插件描述
     */
    public ProcessorPlugin(String pluginName, String pluginDesc, AudioParams audioParams) {
        super(pluginName, pluginDesc, audioParams);
    }

    /**
     * 插件构造函数
     *
     * @param pluginName 插件名称
     */
    public ProcessorPlugin(String pluginName, AudioParams audioParams) {
        super(pluginName, audioParams);
    }

    @Override
    protected AudioData processPlugin(AudioData audioData) {
        return dispose(audioData);
    }

    /**
     * 处理音频数据
     *
     * @param audioData 音频数据
     */
    public abstract AudioData dispose(AudioData audioData);
}
